package com.woniuxy.background.dao;

import com.woniuxy.background.pojo.Goods;
import com.woniuxy.background.vo.GoodVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface GoodsMapper {
    int deleteByPrimaryKey(Integer goodsId);

    int insert(Goods record);

    int insertSelective(Goods record);

    Goods selectByPrimaryKey(Integer goodsId);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKey(Goods record);

    List<Goods> queryGoodsByPage(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize, @Param("vo") GoodVO vo);

    @Select("select * from goods where goods_type_id = #{gtid}")
    List<Goods> selectGoodsByGT(Integer gtid);

}